package exception;

public class ThrowDemo {
    public static void main(String[] args) {
        System.out.println("程序执行了");
        try {
            Person p = new Person();
            p.setAge(999);
            System.out.println("此人的年龄是：" + p.getAge());
        }catch (IllegalAgeException e){
            e.printStackTrace();
        }
    }
}
